cmake_minimum_required(VERSION 3.25)
project(app_update)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)

set(CMAKE_TOOLCHAIN_FILE "C:/Users/aohan/Project/Cpp/vcpkg/scripts/buildsystems/vcpkg.cmake")

find_package(CURL REQUIRED)
# 找到cpr库
find_package(cpr REQUIRED)

# json解析的库 https://github.com/nlohmann/json
find_package(nlohmann_json REQUIRED)

add_executable(app_update main.cpp
        main2.cpp
        json.cpp
)
target_link_libraries(app_update PRIVATE CURL::libcurl)
# 链接cpr库
target_link_libraries(app_update PRIVATE cpr::cpr)